﻿using System.Globalization;
using System.Windows.Data;

namespace CoreModule.Converters
{
    /// <summary>
    /// 血糖状态 对应的颜色
    /// </summary>
    public class BloodGlucoseStatusToColorConverter : IValueConverter
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="value"></param>
        /// <param name="targetType"></param>
        /// <param name="parameter"></param>
        /// <param name="culture"></param>
        /// <returns></returns>
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var bloodGlucoseStatus = (BloodGlucoseStatus)value;
            return Extension.GetBloodGlucoseStatusColor(bloodGlucoseStatus);
           
        }
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
